Shared memory refers to memory that can be accessed by more than one processor or processor core in a multiple-processor and/or multi-core computing device or system. When a processor or core needs fast access to memory, data stored in the shared memory may be transferred to a cache. When one processor or core's cache is updated with information that may need to be used by other processors or cores, the other processors or cores need to be aware of the update in order to prevent the several processors or cores from working with incoherent data.
In distributed shared memory systems, software or firmware programming protocols (which may be referred to as “consistency models”) may be used to ensure that memory is consistent and the results of memory operations are predictable to all processors and/or cores. In general, consistency models define programming rules for the order and visibility of memory updates. A release consistency model uses two synchronization operations: “release” and “acquire.” In the release consistency model, an object has to first be acquired and then later released. After acquiring the object and before releasing it, a processor or core may perform one or more write operations using the object, in which data is written to local memory (local to the acquiring processor or core). Release consistency is considered achieved if write operations by one processor or core are visible to the other processors or cores after the first processor/core releases the object of the write operation and before the other processors/cores acquire it.
Two kinds of protocols that implement release consistency are the “lazy” protocol and the “eager” protocol. In these protocols, all coherence actions are performed on release operations. That is, other processors/cores cannot see the data write until the release operation has been performed. In the lazy protocol, a processor or core does not request pages of virtual memory until the page is accessed; that is, until a page fault occurs. In the eager protocol, all of the accessible pages of virtual memory (e.g., data) are transferred as soon as a computation is offloaded, that is, on an acquire operation.